package com.yunshan.order.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.yunshan.common.annotation.Excel;
import com.yunshan.common.core.domain.BaseEntity;
import com.yunshan.member.domain.ResultMember;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 消费订单对象 order_consume_record
 *
 * @author yunshan
 * @date 2025-01-20
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class OrderConsumeRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 订单号 */
    @ApiModelProperty("订单号")
    @Excel(name = "订单号")
    private String orderNum;

    /** 姓名 */
    @ApiModelProperty("姓名")
    @Excel(name = "姓名")
    private String name;

    /** 手机号 */
    @ApiModelProperty("手机号")
    @Excel(name = "手机号")
    private String phone;

    /** 消费方式1:余额  2:礼包  3:优惠券 */
    @ApiModelProperty("消费方式1:余额  2:礼包  3:优惠券")
    @Excel(name = "消费方式1:余额  2:礼包  3:优惠券")
    private Integer payType;

    /** 项目id */
    @ApiModelProperty("项目id")
    private Long serveId;

    /** 消费项目 */
    @ApiModelProperty("消费项目")
    @Excel(name = "消费项目")
    private String serveName;

    /** 服务类型 */
    @ApiModelProperty("服务类型")
    @Excel(name = "服务类型")
    private String serveType;

    /** 消费金额 */
    @ApiModelProperty("消费金额")
    @Excel(name = "消费金额")
    private BigDecimal amount;

    /** 主卡/副卡 */
    @ApiModelProperty("主卡/副卡：1主卡，2副卡")
    private Integer cardType;

    /** 会员id或副卡id */
    @ApiModelProperty("会员id或副卡id")
    private Long memberId;

    /** 优惠券发放记录表id */
    @ApiModelProperty("优惠券发放记录表id")
    private Long couponRecordId;

    /** 礼包发放记录表id */
    @ApiModelProperty("礼包发放记录表id")
    private Long giftRecordId;

    /** 核销类型1:扫码核销  2:订单核销 */
    @ApiModelProperty("核销类型1:扫码核销  2:订单核销")
    private Integer verifyType;

    /** 余额 */
    @ApiModelProperty("余额")
    @Excel(name = "余额")
    private BigDecimal balance;

    /** 券码 */
    @ApiModelProperty("券码")
    @Excel(name = "券码")
    private String couponCode;

    /** 用餐人数 */
    @ApiModelProperty("用餐人数")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Integer num;

    /** 是否删除0:未删除,1:删除 */
    @ApiModelProperty("是否删除0:未删除,1:删除")
    private Integer isDeleted;

    /** 状态 0:成功 1:失败 */
    @ApiModelProperty("状态 0:成功 1:失败")
    @Excel(name = "状态 0:成功 1:失败")
    private Integer status;


    /** 开始时间 */
    @ApiModelProperty("开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Date startTime;

    /** 结束时间 */
    @ApiModelProperty("结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private Date endTime;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private ResultMember resultMember;

}
